An object counting device that counts persons and objects appearing in an image is disclosed in PTL 1. PTL 1 discloses an imaging device used for counting persons appearing in an image, and a control method for the imaging device.
The imaging device disclosed in PTL 1 detects the faces of persons existing in an acquired image and counts the detected faces. However, there can be a case in which persons overlap each other and appear in an image when, for example, the place is crowded. The imaging device disclosed in PTL 1 has a problem that it is difficult to correctly count persons (objects) in an image in which persons (objects) overlap each other.
There is a technique that solves the above problem and takes the use for a local image region into consideration, for estimating the number of persons by learning an image in which persons overlap each other together with a label of the number of persons. When the number of persons appearing in an image is estimated using this technique, the object counting device sets a plurality of windows for estimation corresponding to local regions (hereinafter referred to as an estimation window) in the image based on the size of, for example, a head to be counted in the image. The object counting device estimates the number of persons in each set estimation window using the above technique.
FIG. 22 is an explanatory diagram showing an example of a method for counting persons appearing in an image using estimation windows. The object counting device sums the number of persons estimated in each estimation window, and the number of persons appearing in the entire image is thereby estimated.